﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<%@ Import Namespace="System.Text" %>

<!DOCTYPE html>

<html>
<head runat="server">
    <meta name="viewport" content="width=device-width" />
    <title>Pagina </title>
    <script type="text/javascript" src="/Scripts/jquery-1.7.1.min.js"></script>
	<script type="text/javascript" src="/ckeditor/ckeditor.js"></script>
    <script type="text/javascript" src="/ckeditor/adapters/jquery.js"></script>
    <script type="text/javascript" src="/ckfinder/ckfinder.js"></script>
</head>
<body>
    <div>
       pagina para salvar o conteudo 
    </div> 
      <script type="text/javascript">
          var data="";
          $(document).ready(function () {
              $('#editor').ckeditor(function () {
                  //var editor = $('#editor').ckeditorGet();
                  var editor = $('#editor').ckeditorGet();
                  // 
                  CKFinder.setupCKEditor(null,'/ckfinder/');
                  // Capturando o conteÃºdo do editor 
                  //data = $('#editor').val();
                  // Adicionando conteÃºdo ao editor  

                  // data = $('#editor').val();  pega o valor que esta no editor
              },
              {
                  height: 350
              });             
          });       
    </script>     

    <form action="Salvar" method="post">
       <label for="nome">Nome:</label> 
       <textarea name="editor" id="editor"><%= Html.ViewData["Teste"] %></textarea>     
       <input ID="btnSubmit" type="submit" value="Salvar" />
    </form>
    <%= Html.ActionLink("Voltar","Index","Home") %> 
    <%= Html.ViewData["text"] %>
</body>
</html>